#!/bin/bash
echo "build local image"
docker build . -t beta-api:latest
echo "push to remote server"
docker login --username=rayssl registry.cn-chengdu.aliyuncs.com
docker tag beta-api:latest registry.cn-chengdu.aliyuncs.com/ray0728/python-api:3.9.5
docker push registry.cn-chengdu.aliyuncs.com/ray0728/python-api:3.9.5
echo "clean local image and cache"
docker rmi beta-api:latest
docker image prune -a
